package com.cg.controller;

import com.cg.dto.Result;
import com.cg.dto.ResultUtils;
import com.cg.entity.Nation;
import com.cg.service.NationService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Nation)表控制层
 *
 * @author chengong
 * @since 2024-01-03 16:54:59
 */
@RestController
@RequestMapping("/nation")
public class NationController {
    /**
     * 服务对象
     */
    @Resource
    private NationService nationService;

    /**
     * 查询所有民族
     */
    @GetMapping("/queryNationList")
    public Result<List<Nation>> queryNationList(){
        return ResultUtils.returnDataSuccess(nationService.queryNationList());
    }

}

